<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$ArticleDBConnection$" formatter="bizobjlist of ArticleSet(highlightPicture)">
	<Sql>
		SELECT
		a.id,a.name,a.dateCreated,a.dateUpdated,a.albumGroupId,a.description,
		ag.mediaCacheName,
		p.id highlightPictureid, p.name as highlightPicturename,
		FROM ArticleSet a
		LEFT JOIN ArticleGroup ag ON a.groupId = ag.id
		LEFT JOIN Articles p ON a.highlightPictureId = p.mediaId
		WHERE
		a.dateCreated between @firstDate and @lastDate
		OR
		a.dateUpdated between @firstDate and @lastDate
		ORDER BY
		a.dateCreated,a.dateUpdated
	</Sql>
	<Param name="firstDate" type="DateTime" />
	<Param name="lastDate" type="DateTime" />
</AdoNetDataAccess>